//
//  JZHSocket.m
//  极致荟
//
//  Created by hetao on 14-8-5.
//  Copyright (c) 2014年 mac. All rights reserved.
//

#import "JZHSocket.h"

@implementation JZHSocket
+ (id)deful:(id)cont
{
    static JZHSocket *jzh;
    if(!jzh)
    {
        jzh=[[JZHSocket alloc]init];
        jzh.socket=[[SRWebSocket alloc]initWithURL:[NSURL URLWithString:@"ws://runlife.vicp.cc:9981"]];
        [jzh.socket open];
        jzh.socket.delegate=cont;
    }
    return jzh;
}
- (void)send:(id)content
{
    [self.socket send:content];
}

- (void)reconnection:(id)cont
{
    self.socket=[[SRWebSocket alloc]initWithURL:[NSURL URLWithString:@"ws://runlife.vicp.cc:9981"]];
    [self.socket open];
    self.socket.delegate=cont;
}
@end
